package kcms.course.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import kcms.course.dao.CourseDao;
import kcms.course.service.CourseService;
import kcms.db.CourseJiaoke;
import kcms.db.User;
@Service
public class CourseServiceImpl implements CourseService{
	@Resource
	private CourseDao coursedao;
	@Transactional(readOnly=false,propagation=Propagation.REQUIRED)
	public List<CourseJiaoke> getAllCourseTeachBy(User user){
		return coursedao.getAllCourseTeachBy(user);		
	}
	@Transactional(readOnly=false,propagation=Propagation.REQUIRED)
	public CourseJiaoke getByCidCsn(String cid, String csn){
		return coursedao.getByCidCsn(cid,csn);
	}
	@Transactional(readOnly=false,propagation=Propagation.REQUIRED)
	public List<CourseJiaoke> getAllCourseByCid(String cid){
		return coursedao.getAllCourseByCid(cid);
	}
}
